<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<div class="t_bar">
	${param.title }${param.unit }
</div>
<table class="t_css table01" width="100%" border="0" cellpadding="0" id="orgInfo" cellspacing="1">
	<col style="width:20%"/>
	<col style="width:15%"/>
	<col style="width:15%"/>
	<col style="width:20%"/>
	<col style="width:15%"/>
	<col style="width:15%"/>
	<tr class="li_1">
	<td align="right">资产总额：</td>
	<td align="center"><span name="org_info/finance/assets" id="assets"><x:out select="$xmlData/data/organization/finances/finance[@sequence_no=5]/assets" /></span>万元
	<input type="hidden" id="zong_assets" label="${param.title}-->资产总额" value="<x:out select="$xmlData/data/organization/finances/finance[@sequence_no=5]/assets" />"/>
	</td>
	<td align="right"><span class="color_red">*</span>净资产：</td>
	<td>
		<input type="text" id="net_asset" name="org_info/finances/finance/net_asset" label="${param.title}-->净资产"  class="input_css required valueGreatEqual:zong_assets:net_asset" style="text-align:right;width: 60%" onfocus="InitInput.setNumber(this,7,2,2)" value="<x:out select="$xmlData/data/org_info/finances/finance/net_asset"/>" />万元
	</td>
	<td align="right">营业收入：</td>
	<td align="center"><span name="org_info/finance/income" id="income"><x:out select="$xmlData/data/organization/finances/finance[@sequence_no=5]/income" /></span>万元</td>
	</tr>
	<tr class="li_2">
	<td align="right">缴税总额：</td>
	<td align="center"><span name="org_info/finance/fax" id="fax"></span>万元</td>
	<input type="hidden" id="fax_added" name="org_info/fax_added" value="<x:out select="$xmlData/data/organization/finances/finance[@sequence_no=5]/fax_added" />"/>
	<input type="hidden" id="fax_bussiness" name="org_info/fax_bussiness" value="<x:out select="$xmlData/data/organization/finances/finance[@sequence_no=5]/fax_bussiness" />"/>
	<input type="hidden" id="fax_income" name="org_info/fax_income" value="<x:out select="$xmlData/data/organization/finances/finance[@sequence_no=5]/fax_income" />"/>
	<input type="hidden" id="fax_personal" name="org_info/fax_personal" value="<x:out select="$xmlData/data/organization/finances/finance[@sequence_no=5]/fax_personal" />"/>
	<input type="hidden" id="fax_other" name="org_info/fax_other" value="<x:out select="$xmlData/data/organization/finances/finance[@sequence_no=5]/fax_other" />"/>
	<td align="right">净利润：</td>
	<td align="center"><span name="org_info/finance/proft"><x:out select="$xmlData/data/organization/finances/finance[@sequence_no=5]/proft" /></span>万元</td>
	<td align="right">出口创汇：</td>
	<td align="center"><span name="org_info/finance/export"><x:out select="$xmlData/data/organization/finances/finance[@sequence_no=5]/export" /></span>万美元</td>
	</tr>
	<tr class="li_1">
	<td align="right">研发资金：</td>
	<td align="center"><span name="org_info/finance/yanfa_income" id="yanfa_income"><x:out select="$xmlData/data/organization/finances/finance[@sequence_no=5]/yanfa_income" /></span>万元</td>
	<td align="right">研发投入占营业<br/>总收入比例：</td>
	<td>
		<input type="text" id="yanfa_ratio" name="org_info/finance/yanfa_ratio" readonly class="gray"style="width: 60%;text-align: right;" value=""/>%
	</td>
	
	<td align="right">资产负债率：</td>
	<td>
	<input type="text" id="liabilities_ratio" name="org_info/finance/liabilities_ratio" readonly class="gray" style="width: 60%;text-align: right;" value=""/>%
	<input type="hidden" id="liabilities" name="org_info/finance/liabilities"  value="<x:out select="$xmlData/data/organization/finances/finance[@sequence_no=5]/liabilities" />" />
	</td>
	</tr>
	<tr class="li_2">
		<td align="right" colspan="2"><span class="color_red">*</span>是否高新技术企业：</td>
		<td align="center" >
			<label> <input type="radio" class="do " id="new_1" style="vertical-align: middle;" name="neworg_type" label="是" value="1" onclick="changeText3(this);" /><span style="vertical-align: middle;">是</span></label> 
			<label> <input type="radio" class="do " id="new_2" style="vertical-align: middle;" name="neworg_type" label="否" value="2" onclick="changeText4(this);" /><span style="vertical-align: middle;">否</span></label> 
			<input type="hidden" name="proposal/neworg_type_value" id="neworg_type_value" class="required" value="<x:out select="$xmlData/data/proposal/neworg_type_value" />" label="${param.title}-->是否高新技术企业" /> 
			<input type="hidden" name="proposal/neworg_type_name" id="neworg_type_name" value="<x:out select="$xmlData/data/proposal/neworg_type_name" />"  />
		</td>
	
		<td align="right" id="zhengshu_no1">高企证书编号：</td>
		<td colspan="2">
			<input id="zhengshu_no" name="proposal/zhengshu_no" label="${param.title}-->高新技术企业证书编号" type="text" readonly class="gray input_css" maxlength="50" style="width:80%;" value="<x:out select="$xmlData/data/proposal/zhengshu_no"/>" />
		</td>
	</tr>
	</table>
	
	<script>
	$(document).ready(function(){
		if($("input[id='zhengshu_no']").val()!=""){
				$("#zhengshu_no").addClass("required");
			  $("#zhengshu_no").removeClass("gray");
			  $("#zhengshu_no").attr("readonly",false);
			  $("#zhengshu_no1").html('<span class="color_red">*</span>'+$(zhengshu_no1).html());
		};
		if ($("#neworg_type_value").val()=="1") {
			$("#zhengshu_no").addClass("required");
			  $("#zhengshu_no").removeClass("gray");
			  $("#zhengshu_no").attr("readonly",false);
			  $("#zhengshu_no1").html('<span class="color_red">*</span>'+$(zhengshu_no1).html());
		};
	
	
		var a =$("#liabilities").val()
		if(a==""){
			a=0;
		}
		a=a.replace(",","");
		var b =$("#assets").html().replace(",","");
		var b_lin_flag = false;
		if (b==0){
			b_lin_flag=true;
		}
		if(!b_lin_flag){
		var a1= parseFloat(a);
		var b1= parseFloat(b);
		var jisuan1=((a1/b1)*100).toFixed(2);	
		$("#liabilities_ratio").val(jisuan1);
		}
		
		
		var c=$("#yanfa_income").html()
		if(c==""){
			c=0;
		}
		c=c.replace(",","");
		var d=$("#income").html().replace(",","");
		var d_lin_flag = false;
		if(d==0){
			d_lin_flag=true;
		}
		if(!d_lin_flag){		
		var c1=parseFloat(c);
		var d1=parseFloat(d);
		var jisuan2=(c1/ d1*100).toFixed(2);
		$("#yanfa_ratio").val(jisuan2);
		
		}
		
		
		var i=$("#fax_added").val();
		var e=$("#fax_bussiness").val();
		var f=$("#fax_income").val();
		var g=$("#fax_personal").val();
		var h=$("#fax_other").val();
		var i1=parseFloat(i);
		var e1=parseFloat(e);
		var f1=parseFloat(f);
		var g1=parseFloat(g);
		var h1=parseFloat(h);
		var jisuan3=(i1+e1+f1+g1+h1).toFixed(2);
		$("#fax").html(jisuan3);
		
		
		
	});
	
	
	function changeText3(obj){
		 
		  if(($(obj).attr("checked")=="checked")){
			  $("#zhengshu_no").addClass("required");
			  $("#zhengshu_no").removeClass("gray");
			  $("#zhengshu_no").attr("readonly",false);
			  $("#zhengshu_no1").html('<span class="color_red">*</span>'+$(zhengshu_no1).html());
		  }
	}
	function changeText4(obj){
		 
		  if(($(obj).attr("checked")=="checked")){
			  $("#zhengshu_no").val("");
			  $("#zhengshu_no").removeClass("required");
			  $("#zhengshu_no").addClass("gray");
			  $("#zhengshu_no").attr("readonly",true);
			  document.getElementById("zhengshu_no1").innerHTML="高企证书编号：";
		  }
	}
	</script>
	
